/*
 * arraylist.h
 *
 *  Created on: Dec 16, 2011
 *      Author: anna
 */

#ifndef ARRAYLIST_H_
#define ARRAYLIST_H_

class Array {

public:
	Array(size_t capacity);
	Array(const Array& array);
	~Array();
	Array& operator=(const Array& array);
	int get(size_t index) const;
	void set(size_t index, int value);
	void push_back(int value);
	size_t size() const;

private:
	int *data;
	size_t capacity;
	size_t actual_size;

	void ensure_capacity(size_t min_capacity);
};


#endif /* ARRAYLIST_H_ */
